/*
 * @Description: 分账管理接口
 * @Date: 2022-12-07 22:03:38
 * @Author: lizhiqiang
 */

import { DivideAccountInfo } from "@/types/api"
import { post,get } from "@/utils/request"
/**
 * 获取分账管理列表
 * @param params 
 * @returns 
 */
export const GetDivideAccountInfoList = (params:DivideAccountInfo) =>{
    return post("/cdwl-merchant/inner/divideaccountinfo/list",params)
}
/**
 * 获取分账管理详情
 * @param id 
 * @returns 
 */
export const GetDivideAccountInfo =(id:string)=>{
    return get(`/cdwl-merchant/inner/divideaccountinfo/info/${id}`)
}
/**
 * 保存分账管理
 * @param params 
 * @returns 
 */
export const SaveDivideAccountInfo =(params:DivideAccountInfo)=>{
    return post("/cdwl-merchant/inner/divideaccountinfo/save",params)
}
/**
 * 修改分账管理
 * @param params 
 * @returns 
 */
export const UpdateDivideAccountInfo =(params:DivideAccountInfo)=>{
    return post("/cdwl-merchant/inner/divideaccountinfo/update",params)
}
/**
 * 删除分账管理
 * @param params 
 * @returns 
 */
export const DeleteDivideAccountInfo =(params:Array<string>)=>{
    return post("/cdwl-merchant/inner/divideaccountinfo/deleteBatch",params)
}
/**
 * 获取应用门店分账信息详情
 * @param params 
 * @returns 
 */
export const GetDivideAccountInfoByAppStore = (params:{
    pkApp:string,
    pkStore:string
})=>{
    return get("/cdwl-merchant/inner/divideaccountinfo/getByAppAndStore",params)
}
/**
 * 结算比例配置批量提审
 * @param params 
 * @returns 
 */
export const ReferralSettlementRatio = (params: Array<string>)=>{
    return post("/cdwl-merchant/inner/divideaccountinfo/initiateReview",params)
}
/**
 * 结算比例配置审核
 * @param params 
 * @returns 
 */
export const AuditSettlementRatio = (params:{
    id: string,
    auditOpinion: string,
    status: number
})=>{
    return post("/cdwl-merchant/inner/divideaccountinfo/examine",params)
}